package com.doodod.api.model.base;

import java.io.Serializable;

/**
 * Created with IntelliJ IDEA.
 * User: 邱孝兵
 * Date: 2015/2/10
 * Time: 15:09
 */
public class RequestModel implements Serializable {
    private String appversion;
    private String token;
    private String timestamp;
    private String method;
    private String sign;
    private String app_id;

    public String getApp_id() {
        return app_id;
    }

    public void setApp_id(String app_id) {
        this.app_id = app_id;
    }

    public String getAppversion() {
        return appversion;
    }

    public void setAppversion(String appversion) {
        this.appversion = appversion;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    /**
     * 数据校验，可重写逻辑
     * @return
     */
    public boolean judgeNormal() {
        if (null == timestamp || "".equals(timestamp))
            return false;

        if (null == method || "".equals(method))
            return false;

        if (null == sign || "".equals(sign))
            return false;
        return true;
    }
}
